num = 0

for i in range(1, 5):
    for j in range(1, 5):
        for k in range(1, 5):
            if (i != j) and (j != k) and (i != k):
                print(i * 100 + j * 10 + k, end="\t")
                num += 1
                if (num % 4 == 0):
                    print("")
print("\n1,2,3,4能组成", num, "个互不相同并且无重复数字的三位数")
